import type { IBaseListQueryParams } from '../modules/response'
import type { CommonReturn, CommonReturnListItem } from '../schema/all'

export type NodeListItem = CommonReturnListItem<'/api/node/query', 'get'>
export type NodeDetails = CommonReturn<'/api/node', 'get'>
export type InstallScript = CommonReturn<'/api/node/install-command', 'get'>

export interface NodeParams extends IBaseListQueryParams {
  region_id?: string
  keyword_name?: string //搜索节点名称关键字
  keyword_ip?: string //ip搜索
  run_status?: number //1运行 2停止 3异常
  sync_status?: number //同步状态
}

export interface NodeDefaultConfig {
  cache_template: {
    storage_config: {
      memory: {
        memory_usage: number
        memory_max_file_size: string
      }
      disk: {
        disk_max_file_size: string
        disk_path: string
        disk_usage: number
      }
    }
    suffix_list: { name: string; cache_type: string }[]
  }
  cascade_level: number
}
